package com.file.system.entity.res;

import lombok.Getter;
import lombok.Setter;


/**
 * 数据分页
 */
@Getter
@Setter
public class DataPage<T> {

    /**
     * 总数
     *
     * @mock 99
     */
    private int total;
    /**
     * 数据
     *
     * @mock
     */
    private T data;

    public DataPage() {

    }

    public static <T> DataPage<T> init() {
        DataPage dp = new DataPage();
        return dp;
    }

    public DataPage<T> set(int total, T data) {
        this.total = total;
        this.data = data;
        return this;
    }

}
